package com.atguigu.yygh.statistics.controller;

import com.atguigu.yygh.common.result.R;
import com.atguigu.yygh.statistics.service.StatisticsService;
import com.atguigu.yygh.vo.order.OrderCountQueryVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @description:-预约统计分析
 * @author :又菜又爱玩的→速趴塞亚锦←
 * @create :2023/5/21
 * @param  :1.8
 */
@RestController
@RequestMapping("/admin/statistic")
public class StatisticsController {

    @Resource
    private StatisticsService statisticsService;


    @GetMapping("/countByDate")
    public R statistics(OrderCountQueryVo orderCountQueryVo){
        Map<String,Object> map=statisticsService.statistics(orderCountQueryVo);
        return R.ok().data(map);
    }
}
